home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FM Towns: Free Software Collection 9
/
FM Towns Free Software Collection 9.iso
/
taropyon
/
install
/
install.cci
< prev
next >
Wrap
Text File
|
1994-11-16
|
51KB
|
2,153 lines
# 1 "install.c"
# 1 "install.c"
# 4 "install.h"
int disp_desktop();
int syl_clear();
int syl_putf(char *form);
char *add_path_fn(char *path, char *fn);
int tif_load(char *fn);
int tiflist_disp( char **list );
int mveplay(char *fn, int loop);
int exprun(char *fn, char *para);
int inst_help( int evNo, char *evDat, char *fn);
int install_end( char *soft_name, int err );
int install_exec( char *probuf );
int item_setApl( int drv, int icon, char *ttl, char *path, char *para, int att );
char *get_inst_taro_mnu();
char *get_inst_gsplaydata_mnu();
# 23 "install.c"
int DrvInst = -1;
int PltNoWhite = 5;
int ColBoxNormal = 0;
int ColBoxInfo = 0;
int ColBoxCaution = 0;
int ColBoxError = 0;
int ColMesh = 0;
int init();
int term();
int install_main();
int set_debug_menu(char *mnu);
# 42 "install.c"
int main(int argc, char **argv)
{
init();
install_main();
term();
return (0);
}
int init()
{
char msg[80], tmp[128];
char *mnu;
char *msgMenu[(1)];
char *img;
int winBasCol;
APL_init((0x0303),1,1);
LHA_sysInit((0));
disp_desktop();
SCN_wrtPage(1);
tmp[0] = 0;
tmp[1] = 255;
tmp[2] = 255;
tmp[3] = 255;
SCN_palette(0,PltNoWhite,tmp);
SCN_wrtPage(1);
winBasCol = 0;
winBasCol = (_ScnCol_though);
APL_openBaseWin(winBasCol);
SCN_wrtPage(1);
strcpy(msg," SYSTEM ");
msgMenu[0] = " INSTALL ";
# 85 "install.c"
APL_openTopBarMenu(Fnt16x16,msg,(_ScnColTbl[12]), (1),Fnt16x12,msgMenu,(_ScnCol_black));
MNU_datAdd( SysMnu, 0, 'A', Fnt16x16, 0, "about_dlg" , 0, "このプログラムについて");
MNU_datAdd( SysMnu, 0, 'F', Fnt16x16, 0, "dsp_freemem", 0, "フリーメモリ" );
mnu = AplMnu[0];
MNU_datAdd( mnu, 0, 'H', Rom16x16, 0, "inst_help", "message.doc", "説明" );
MNU_datAdd( mnu, 0, 0 , Rom16x16, 0, "" , 0 , (0) );
MNU_mnuAdd( mnu, 0, 'T', Fnt16x16, get_inst_taro_mnu() , "TaroPYON" );
MNU_mnuAdd( mnu, 0, 'G', Fnt16x16, get_inst_gsplaydata_mnu() , "MUSIC data for GSPLAY");
# 104 "install.c"
APL_setExitEvt("EXIT",(9999),"exit_chk");
AplDtaInit();
ColBoxNormal = SCN_tile_newMixCol(ColBoxNormal ,(0x00),(_ScnCol_dark) ,(_ScnColTbl[ 7]));
ColBoxInfo = SCN_tile_newMixCol(ColBoxInfo ,(0x00),(_ScnColTbl[12]) ,(_ScnColTbl[ 7]));
ColBoxError = SCN_tile_newMixCol(ColBoxError ,(0x00),(_ScnColTbl[10]) ,(_ScnColTbl[ 7]));
ColBoxCaution = SCN_tile_newMixCol(ColBoxCaution,(0x00),(_ScnColTbl[14]),(_ScnColTbl[ 7]));
ColMesh = SCN_tile_newMixCol(ColMesh ,(0x00),(_ScnCol_though),(_ScnColTbl[ 7]));
return ((0));
}
int term()
{
char tmp[256];
FS_chdrv(toupper(DirStart[0]) - 'A');
sprintf(tmp,"%s.",DirStart);
FS_chdir(tmp);
APL_term();
}
int disp_desktop()
{
char tmp[256];
sprintf(tmp,"%s%s", DirStart, "install.tif" );
return tif_load(tmp);
return (0);
# 173 "install.c"
}
int install_main()
{
int ret;
SCN_wrtPage(1);
syl_clear();
for (;;)
{
PD_curOn();
ret = EV_chk(EvTop,0);
if ( ret == (9999) )
break;
}
return (0);
}
int exit_chk()
{
char *dlgTxm;
int i, ret;
static char *msgtbl[4] =
{
"",
"インストーラを終了しますか?",
"",
(0)
};
dlgTxm = DlgTxm_open(ColBoxCaution);
for ( i = 0; msgtbl[i] != (0); ++i )
DlgTxm_putf( dlgTxm, Fnt16x16, (1), msgtbl[i]);
DlgTxm_setBtn( dlgTxm, Fnt16x16, 128, 20, (_ScnCol_black), (_ScnColTbl[ 7]), (_ScnColTbl[15]), (_ScnCol_dark),
'\r' , 0x7300 , (9999), "", 0, "終了 : [実行]");
DlgTxm_setBtn( dlgTxm, Fnt16x16, 128, 20, (_ScnCol_black), (_ScnColTbl[ 7]), (_ScnColTbl[15]), (_ScnCol_dark),
'\x1B', 0x7200, 0, "", 0, "取消 : [取消]");
DlgTxm_setSize(dlgTxm,480,64);
DlgTxm_setPosition(dlgTxm,(1));
ret = DlgTxm_start(dlgTxm);
DlgTxm_close(dlgTxm);
if ( ret != (9999) )
ret = 0;
return (ret);
}
int about_dlg()
{
char *dlgTxm;
dlgTxm = DlgTxm_open(ColBoxNormal);
DlgTxm_setTitle(dlgTxm,Fnt16x16, "Installer ver.%s edition #%s",
"1.01a", "02" );
DlgTxm_putf( dlgTxm, Fnt16x16, (1),"TaroPYON SoftWare Collection インストールプログラム");
DlgTxm_putf( dlgTxm, Fnt16x08, (1), "");
DlgTxm_putf( dlgTxm, Fnt16x12, (1),"for FreeSoftWare colletion 9");
DlgTxm_putf( dlgTxm, Fnt16x12, (1), "");
DlgTxm_putf( dlgTxm, Fnt16x16, (1), "%c%c TaroPYON",
Gaiji_copyright>>8, Gaiji_copyright&0xFF );
DlgTxm_setBtn( dlgTxm, Fnt16x16, 128, 20, (_ScnCol_black),
(_ScnColTbl[ 7]), (_ScnCol_hilight), (_ScnCol_dark), '\r', 0x7300, 0, "", 0, "OK : [実行]");
DlgTxm_setSize(dlgTxm,320,48);
DlgTxm_setPosition(dlgTxm,(1));
DlgTxm_start(dlgTxm);
DlgTxm_close(dlgTxm);
return (0);
}
int dsp_freemem()
{
unsigned int siz;
char *dlgTxm;
char tmp1[32], tmp2[32];
siz = APL_getFreeMem();
dlgTxm = DlgTxm_open(ColBoxInfo);
DlgTxm_setTitle(dlgTxm,Fnt16x16, "FREE MEMORY SIZE");
DlgTxm_putf( dlgTxm, Fnt16x12, (1),
"free memory %s (%s) bytes",
fdl_ltoaDig(siz,tmp1), fdl_ltoaMsg(siz,tmp2) );
DlgTxm_setBtn( dlgTxm, Fnt16x16, 128, 20, (_ScnCol_black),
(_ScnColTbl[ 7]), (_ScnCol_hilight), (_ScnCol_dark), '\r', 0x7300, 0, "", 0, "OK : [実行]");
DlgTxm_setSize(dlgTxm,400,64);
DlgTxm_setPosition(dlgTxm,(0),2,22);
DlgTxm_start(dlgTxm);
DlgTxm_close(dlgTxm);
}
# 14 "insttaro.c"
char *_tarosc_aplname[(7)] =
{
"HEwin" ,
"EDIA" ,
"GSPLAY" ,
"HE386" ,
"CCI" ,
"DOS tools",
"TownsOS tools"
};
char _tarosc_skey[(7)] =
{ 'H',
'E',
'G',
'M',
'C',
'D',
'T'
};
char _tarosc_instdir[(7)][128];
char _tarosc_defdir[128];
int _tarosc_fcopy_att;
int _hewin_swapDrv, _hewin_init;
int _edia_swapDrv;
int _gsplay_midi;
int _gsplay_rsmidi;
int _gsplay_internal;
int _tarosc_setinstdir(char *instdir);
int _tarosc_setapldir();
int _tarosc_set_fcopymode();
int _tarosc_check_config(int item_setup);
int _hewin_config(char *instdir, int item_setup);
int _hewin_install(char *instdir,int item_setup);
int _hewin_setup(char *instdir,int item_setup);
int _edia_config(char *instdir, int item_setup);
int _edia_install(char *instdir,int item_setup);
int _edia_setup(char *instdir,int item_setup);
int _hewin_edia_setup(char *fn_mac, char *instdir,int item_setup);
int _chk_pathlist( char *pathlist, char *path );
int _gsplay_config(char *instdir, int item_setup);
int _gsplay_install(char *instdir,int item_setup);
int _gsplay_setup(char *instdir,int item_setup);
int _he386_install(char *instdir,int item_setup);
int _cci_install(char *instdir,int item_setup);
int _dostool_install(char *instdir,int item_setup);
int _tostool_install(char *instdir,int item_setup);
char *get_inst_taro_mnu()
{
char *mnu;
if ( (mnu = MNU_open()) == (0) )
return ((0));
MNU_datAdd( mnu, 0, 'H', Rom16x16, 0, "tarosc_install" , 0, "TaroPYON SoftWare Collection");
MNU_datAdd( mnu, 0, 'S', Rom16x16, 0, "tarosdk_install", 0, "サイドワークプログラム集" );
MNU_datAdd( mnu, 0, 0 , Rom16x16, 0, "" , 0, (0) );
MNU_datAdd( mnu, 0, '1', Rom16x16, 0, "splib_install" , 0, "ライブラリ&ソ\ース 1 (SPLIB)" );
MNU_datAdd( mnu, 0, '2', Rom16x16, 0, "silib_install" , 0, "ライブラリ&ソ\ース 2 (SILIB)" );
MNU_datAdd( mnu, 0, '3', Rom16x16, 0, "dtalib_install" , 0, "ライブラリ&ソ\ース 3 (DTALIB)" );
# 80 "insttaro.c"
MNU_setPosition(mnu,-1);
return (mnu);
}
int tarosc_install()
{
int ret, i, att, len, drv, argc, item_setup;
char *fp;
char **argv, *p, *typename;
char *instdir;
char *softname;
char srcdir[128], instfile[128];
char helpfn[128];
char item_ttl[80],item_prog[16], item_para[128];
int item_att;
char *dlgTxm;
char tmp[256], tmp2[256];
instdir = _tarosc_defdir; instdir[0] = '\0';
softname = "TaroPYON SoftWare collection";
_tarosc_fcopy_att = (0x00000001) | (0x00000010) | (0x00000100) | (0x01000000);
_TOP:
syl_putf(softname);
dlgTxm = DlgTxm_open(ColBoxNormal);
DlgTxm_setTitle(dlgTxm,Fnt16x16,softname);
DlgTxm_putf( dlgTxm, Fnt16x16, (1),
"%s をインストールします。", softname );
DlgTxm_setBtn( dlgTxm, Fnt16x16, 128, 20, (_ScnCol_black), (_ScnColTbl[ 7]), (_ScnCol_hilight), (_ScnCol_dark), '\r' , 0x7300 ,
1, "", 0, "インストール : [実行]");
DlgTxm_setBtn( dlgTxm, Fnt16x16, 128, 20, (_ScnCol_black), (_ScnColTbl[ 7]), (_ScnCol_hilight), (_ScnCol_dark), 'H' , 0x2300 ,
2, "inst_help", "/TAROPYON/tarocol.doc", "説明 : [H]");
DlgTxm_setBtn( dlgTxm, Fnt16x16, 128, 20, (_ScnCol_black), (_ScnColTbl[ 7]), (_ScnCol_hilight), (_ScnCol_dark), '\x1B', 0x7200,
3, "", 0, "取消 : [取消]");
DlgTxm_setSize(dlgTxm,320,40);
DlgTxm_setPosition(dlgTxm,(1));
do
{
ret = DlgTxm_start(dlgTxm);
} while ( ret == 2 );
DlgTxm_close(dlgTxm);
if ( ret != 1 )
goto _RET;
_SETDIR:
if ( _tarosc_setinstdir(instdir) )
goto _TOP;
if ( _tarosc_setapldir() < 0 )
goto _TOP;
dlgTxm = DlgTxm_open(ColBoxNormal);
DlgTxm_setTitle(dlgTxm,Fnt16x16,softname);
DlgTxm_putf( dlgTxm, Fnt16x16, (1),
"以下のディレクトリにインストールします。" );
DlgTxm_putf( dlgTxm, Fnt16x12, (1),"");
ret = 0;
for ( i = 0; i < (7); ++i )
{
if ( _tarosc_instdir[i][0] )
{
ret = 1;
DlgTxm_putf( dlgTxm, Fnt16x12, (0),
" %-14s [%s]", _tarosc_aplname[i], _tarosc_instdir[i] );
}
}
DlgTxm_putf( dlgTxm, Fnt16x12, (1),"");
DlgTxm_putf( dlgTxm, Fnt16x16, (1),
"インストール1 … ファイルを複写してTownsMENU にアイテム登録");
DlgTxm_putf( dlgTxm, Fnt16x16, (1),
"インストール2 … ファイルを複写(アイテム登録はしない) ");
DlgTxm_setBtn( dlgTxm, Fnt16x16, 144, 20, (_ScnCol_black), (_ScnColTbl[ 7]), (_ScnCol_hilight), (_ScnCol_dark), '\r' , 0x7300 , 1, "", 0, "インストール1 : [実行]");
DlgTxm_setBtn( dlgTxm, Fnt16x16, 144, 20, (_ScnCol_black), (_ScnColTbl[ 7]), (_ScnCol_hilight), (_ScnCol_dark), 'C' , 0x2C00 , 2, "", 0, "インストール2 : [C]");
DlgTxm_setBtn( dlgTxm, Fnt16x16, 144, 20, (_ScnCol_black), (_ScnColTbl[ 7]), (_ScnCol_hilight), (_ScnCol_dark), '\x1B', 0x7200, 3, "", 0, "取消 : [取消]");
DlgTxm_setSize(dlgTxm,320,40);
DlgTxm_setPosition(dlgTxm,(1));
ret = DlgTxm_start(dlgTxm);
DlgTxm_close(dlgTxm);
if ( ret != 1 && ret != 2 )
goto _TOP;
item_setup = (ret == 1 ? 1 : 0);
_tarosc_set_fcopymode();
if ( _tarosc_instdir[(0) ][0] ) _hewin_config( _tarosc_instdir[(0) ], item_setup);
if ( _tarosc_instdir[(1) ][0] ) _edia_config( _tarosc_instdir[(1) ], item_setup);
if ( _tarosc_instdir[(2) ][0] ) _gsplay_config( _tarosc_instdir[(2) ], item_setup);
ret = _tarosc_check_config(item_setup);
if ( ret < 0 )
goto _TOP;
if ( ret == 0 )
goto _SETDIR;
if ( _tarosc_instdir[(0) ][0] ) _hewin_install( _tarosc_instdir[(0) ], item_setup);
if ( _tarosc_instdir[(1) ][0] ) _edia_install( _tarosc_instdir[(1) ], item_setup);
if ( _tarosc_instdir[(2) ][0] ) _gsplay_install( _tarosc_instdir[(2) ], item_setup);
if ( _tarosc_instdir[(3) ][0] ) _he386_install( _tarosc_instdir[(3) ], item_setup);
if ( _tarosc_instdir[(4) ][0] ) _cci_install( _tarosc_instdir[(4) ], item_setup);
if ( _tarosc_instdir[(5)][0] ) _dostool_install(_tarosc_instdir[(5)], item_setup);
if ( _tarosc_instdir[(6)][0] ) _tostool_install(_tarosc_instdir[(6)], item_setup);
install_end( softname, 0 );
_RET:
syl_clear();
return ((0));
}
int _tarosc_setinstdir(char *instdir)
{
char tmp[256];
if ( APL_setInstallDir(instdir,"インストール先指定") )
return ((-1));
strcpy(tmp,instdir);
add_path_fn(tmp,"");
sprintf( _tarosc_instdir[(0) ], "%s%s", tmp, "HEWIN" );
sprintf( _tarosc_instdir[(1) ], "%s%s", tmp, "EDIA" );
sprintf( _tarosc_instdir[(2) ], "%s%s", tmp, "GSPLAY" );
sprintf( _tarosc_instdir[(3) ], "%s%s", tmp, "HE386" );
sprintf( _tarosc_instdir[(4) ], "%s%s", tmp, "CCI" );
sprintf( _tarosc_instdir[(5) ], "%s%s", tmp, "DOSTOOL");
sprintf( _tarosc_instdir[(6) ], "%s%s", tmp, "TOSTOOL");
return ((0));
}
int _tarosc_setapldir()
{
char *mnu, *mnuapl[(7)];
char *dir;
int i, flag, ret;
for ( i = 0; i < (7); ++i )
{
if ( (mnuapl[i] = MNU_open()) != (0) )
{
MNU_datAdd( mnuapl[i], 0, '1', Rom16x16, i, "_setdir_tarosc" , (0), "Set directory");
MNU_datAdd( mnuapl[i], 0, '0', Rom16x16, i, "_noinstall_tarosc", (0), "No install" );
MNU_setPosition(mnuapl[i],-1);
}
}
do
{
if ( (mnu = MNU_open()) == (0) )
return ((-1));
for ( i = 0; i < (7); ++i )
{
dir = _tarosc_instdir[i];
if ( *dir == '\0' )
dir = "No install";
MNU_mnuAdd( mnu, 0, _tarosc_skey[i], Fnt16x16, mnuapl[i],
"%-14s [%s]", _tarosc_aplname[i], dir);
}
MNU_datAdd( mnu, 0, 0 , (0) , 0, "", 0, (0) );
MNU_datAdd( mnu, 0, 'S', Rom16x16, 1, "", 0, " <<< 設定終了 >>>");
MNU_setPosition(mnu,(1));
ret = MNU_start(mnu);
MNU_close(mnu);
MNU_datClear(mnu);
} while ( ret == 0 );
flag = 0;
for ( i = 0; i < (7); ++i )
{
if ( _tarosc_instdir[i][0] )
flag = 1;
MNU_datClear( mnuapl[i] );
}
if ( flag == 0 )
ret = -1;
return (ret);
}
int _setdir_tarosc(int evNo, char *evdat)
{
char *aplname;
char *instdir;
instdir = _tarosc_instdir[evNo];
if ( *instdir == '\0' )
strcpy(instdir,_tarosc_defdir);
APL_setInstallDir(instdir,"%s インストール先指定", _tarosc_aplname[evNo]);
return (0);
}
int _noinstall_tarosc(int evNo, char *evdat)
{
_tarosc_instdir[evNo][0] = '\0';
return (0);
}
# 287 "insttaro.c"
int _tarosc_set_fcopymode()
{
int ret;
char *dlgTxm;
dlgTxm = DlgTxm_open(ColBoxNormal);
DlgTxm_setTitle(dlgTxm,Fnt16x16,"ファイル複写動作の設定");
DlgTxm_putf( dlgTxm, Fnt16x16, (1),
"インストール時のファイル複写動作を指定してください。");
DlgTxm_putf( dlgTxm, Fnt16x12, (1), "");
DlgTxm_putf( dlgTxm, Fnt16x16, (1),
"ノーマル … 通常の複写 ");
DlgTxm_putf( dlgTxm, Fnt16x16, (1),
"日付比較 … タイムスタンプを比較して新しいファイルのみ複写");
DlgTxm_setBtn( dlgTxm, Fnt16x16, 160, 20, (_ScnCol_black), (_ScnColTbl[ 7]), (_ScnCol_hilight), (_ScnCol_dark), '\r' , 0x7300 ,
0, "", 0, "ノーマル : [実行]");
DlgTxm_setBtn( dlgTxm, Fnt16x16, 160, 20, (_ScnCol_black), (_ScnColTbl[ 7]), (_ScnCol_hilight), (_ScnCol_dark), 'T' , 0x1500 ,
1, "", 0, "日付比較 : [T]");
DlgTxm_setSize(dlgTxm,480,40);
DlgTxm_setPosition(dlgTxm,(1));
do
{
ret = DlgTxm_start(dlgTxm);
} while ( ret < 0 );
DlgTxm_close(dlgTxm);
_tarosc_fcopy_att = (0x00000001) | (0x00000010) | (0x00000100) | (0x01000000);
if ( ret )
_tarosc_fcopy_att |= (0x00000200);
return ((0));
}
# 327 "insttaro.c"
int _tarosc_check_config(int item_setup)
{
int ret, i;
char *dlgTxm;
char tmp[256], *msg;
dlgTxm = DlgTxm_open(ColBoxNormal);
DlgTxm_setTitle(dlgTxm,Fnt16x16,"設定の確認");
DlgTxm_putf( dlgTxm, Fnt16x16, (0),
" 実行ファイルのアイテム登録 … [%s]",
item_setup ? "行う" : "行わない" );
DlgTxm_putf( dlgTxm, Fnt16x16, (0),
" ファイル複写動作モード … [%s]",
(_tarosc_fcopy_att & (0x00000200)) ? "日付比較" : "ノーマル" );
if ( _tarosc_instdir[(0)][0] )
{
DlgTxm_putf( dlgTxm, Fnt16x16, (0),
" HEwin 初期設定 … [%s]",
_hewin_init ? "する" : "しない");
if ( item_setup )
{
if ( _hewin_swapDrv < 0 )
msg = "指定なし";
else
{
msg = tmp;
sprintf(msg,"%c:", _hewin_swapDrv);
}
DlgTxm_putf( dlgTxm, Fnt16x16, (0),
" HEwin 作業ドライブ … [%s]", msg);
}
}
if ( _tarosc_instdir[(1)][0] )
{
if ( item_setup )
{
if ( _edia_swapDrv < 0 )
msg = "指定なし";
else
{
msg = tmp;
sprintf(msg,"%c:", _hewin_swapDrv);
}
DlgTxm_putf( dlgTxm, Fnt16x16, (0),
" EDIA 作業ドライブ … [%s]", msg);
}
}
if ( _tarosc_instdir[(2)][0] )
{
if ( item_setup && (_gsplay_midi >= 0 || _gsplay_rsmidi || _gsplay_internal >=0) )
{
if ( _gsplay_midi < 0 )
{
msg = "未使用";
} else
{
msg = tmp;
sprintf(msg,"port %c", _gsplay_midi + 'A' );
}
DlgTxm_putf( dlgTxm, Fnt16x16, (0),
" GSPLAY 演奏データ出力先 … [MIDI card (%s)]", msg);
if ( _gsplay_rsmidi >= 0 )
DlgTxm_putf( dlgTxm, Fnt16x16, (0),
" … [RS-232C MIDI]");
if ( _gsplay_internal >= 0 )
DlgTxm_putf( dlgTxm, Fnt16x16, (0),
" … [内蔵音源]");
}
}
DlgTxm_setBtn( dlgTxm, Fnt16x16, 128, 20, (_ScnCol_black), (_ScnColTbl[ 7]), (_ScnCol_hilight), (_ScnCol_dark), '\r' , 0x7300 ,
1, "", 0, "インストール : [実行]");
DlgTxm_setBtn( dlgTxm, Fnt16x16, 128, 20, (_ScnCol_black), (_ScnColTbl[ 7]), (_ScnCol_hilight), (_ScnCol_dark), 'R' , 0x1400 ,
2, "", 0, "再設定 : [R]");
DlgTxm_setBtn( dlgTxm, Fnt16x16, 128, 20, (_ScnCol_black), (_ScnColTbl[ 7]), (_ScnCol_hilight), (_ScnCol_dark), '\x1B', 0x7200,
3, "", 0, "取消 : [取消]");
DlgTxm_setSize(dlgTxm,480,40);
DlgTxm_setPosition(dlgTxm,(1));
ret = DlgTxm_start(dlgTxm);
DlgTxm_close(dlgTxm);
switch ( ret )
{
case 1:
return (1);
case 2:
return (0);
default:
return (-1);
}
}
# 426 "insttaro.c"
int _hewin_config(char *instdir, int item_setup)
{
int ret;
char *dlgTxm;
char *dlgGets;
char buf[8];
_hewin_init = 0;
dlgTxm = DlgTxm_open(ColBoxNormal);
DlgTxm_setTitle(dlgTxm,Fnt16x16,"HEwin 環境設定");
DlgTxm_putf( dlgTxm, Fnt16x16, (1),
"インストール時にHEwin の初期設定を行いますか?");
DlgTxm_putf( dlgTxm, Fnt16x12, (1), "");
DlgTxm_putf( dlgTxm, Fnt16x16, (1),
"新規にHEwin をインストールするときは[初期設定]を指定してください。");
DlgTxm_putf( dlgTxm, Fnt16x12, (1),"");
DlgTxm_putf( dlgTxm, Fnt16x16, (1),
"※ 初期設定を指定すると、既にインストールされている");
DlgTxm_putf( dlgTxm, Fnt16x16, (1),
" HEwin の設定情報は失われます。 ");
DlgTxm_setBtn( dlgTxm, Fnt16x16, 128, 20, (_ScnCol_black), (_ScnColTbl[ 7]), (_ScnCol_hilight), (_ScnCol_dark), 'I' , 0x1800 ,
1, "", 0, "初期設定 : [I]");
DlgTxm_setBtn( dlgTxm, Fnt16x16, 128, 20, (_ScnCol_black), (_ScnColTbl[ 7]), (_ScnCol_hilight), (_ScnCol_dark), 'N' , 0x2F00 ,
0, "", 0, "なし : [N]");
DlgTxm_setSize(dlgTxm,320,40);
DlgTxm_setPosition(dlgTxm,(1));
do
{
ret = DlgTxm_start(dlgTxm);
} while ( ret < 0 );
DlgTxm_close(dlgTxm);
_hewin_init = ret;
_hewin_swapDrv = -1;
if ( item_setup )
{
if ( (dlgGets = DlgGets_open()) == (0) )
return ((-1));
DlgGets_setTitle(dlgGets,Fnt16x16,"HEwin 環境設定");
buf[0] = '\0';
DlgGets_setSize(dlgGets,320,64);
DlgGets_putf( dlgGets, Fnt16x16, 1, "作業ドライブを指定してください(例:「D」)。" );
DlgGets_setPosition(dlgGets,(1));
if ( DlgGets_start(dlgGets,3,buf) == (0) )
{
if ( isalpha(buf[0]) )
_hewin_swapDrv = toupper(buf[0]);
else
_hewin_swapDrv = -1;
}
DlgGets_close(dlgGets);
}
return ((0));
}
int _hewin_install(char *instdir,int item_setup)
{
int ret, att, len, drv;
char *srcdir, *instfile;
char *item_prog, *item_ttl, item_para[128];
int item_att;
char tmp[256], tmp2[256];
srcdir = "/TAROPYON/HEWIN";
instfile = "*.exp *.cci *.c *.h *.rex *.dll *.exe *.doc *.hlp *.lst *.tbl";
item_prog = "HEWIN.EXP";
item_ttl = "HEwin";
item_para[0] = '\0';
item_att = 2;
syl_putf("HEWIN INSTALL");
FS_chdrv( toupper(DirStart[0]) - 'A' );
if ( *srcdir == '\0' || *srcdir == '.' )
{
strcpy(tmp,DirStart);
ret = strlen(tmp);
if ( ret > 3 && FS_isDelim(tmp[ret-1]) )
tmp[ret-1] = '\0';
} else
{
if ( FS_isDelim(*srcdir) )
strcpy(tmp,srcdir);
else
sprintf(tmp,"%s%s",DirStart, srcdir);
}
FS_getFullPn(tmp2,tmp);
srcdir = tmp2;
att = _tarosc_fcopy_att;
ret = FCOPY_exec(att, srcdir, instfile, instdir);
if ( _hewin_init )
{
instfile = "*.apl *.env *.ini *.itm *.tif";
att = _tarosc_fcopy_att & (~(0x00000001));
ret = FCOPY_exec(att, srcdir, instfile, instdir);
}
syl_putf("HEWIN CUSTOMIZE");
_hewin_setup(instdir,item_setup);
if ( ret == (0) && item_setup != 0 )
{
syl_putf("HEWIN ITEM SETUP");
if ( isalpha(_hewin_swapDrv) )
sprintf(item_para,"-swapDrv %c", _hewin_swapDrv);
drv = toupper(instdir[0]) - 'A';
strcpy(tmp,instdir);
add_path_fn(tmp,item_prog);
item_setApl( drv, 1024, item_ttl, tmp, item_para, item_att );
}
return (ret);
}
int _hewin_setup(char *instdir,int item_setup)
{
return _hewin_edia_setup("hewin.mac", instdir, item_setup);
}
# 555 "insttaro.c"
int _edia_config(char *instdir, int item_setup)
{
int ret;
char *dlgGets;
char buf[8];
_edia_swapDrv = -1;
if ( item_setup )
{
if ( (dlgGets = DlgGets_open()) == (0) )
return ((-1));
DlgGets_setTitle(dlgGets,Fnt16x16,"EDIA 環境設定");
buf[0] = '\0';
DlgGets_setSize(dlgGets,320,64);
DlgGets_putf( dlgGets, Fnt16x16, 1, "作業ドライブを指定してください(例:「D」)。" );
DlgGets_setPosition(dlgGets,(1));
if ( DlgGets_start(dlgGets,3,buf) == (0) )
{
if ( isalpha(buf[0]) )
_edia_swapDrv = toupper(buf[0]);
else
_edia_swapDrv = -1;
}
DlgGets_close(dlgGets);
}
return ((0));
}
int _edia_install(char *instdir,int item_setup)
{
int ret, att, len, drv;
char *srcdir, *instfile;
char *item_prog, *item_ttl, item_para[128];
int item_att;
char tmp[256], tmp2[256];
srcdir = "/TAROPYON/EDIA";
instfile = "*.exp *.cci *.c *.h *.rex *.dll *.doc";
item_prog = "EDIA.EXP";
item_ttl = "EDIA";
item_para[0] = '\0';
item_att = 2;
syl_putf("EDIA INSTALL START");
FS_chdrv( toupper(DirStart[0]) - 'A' );
if ( *srcdir == '\0' || *srcdir == '.' )
{
strcpy(tmp,DirStart);
ret = strlen(tmp);
if ( ret > 3 && FS_isDelim(tmp[ret-1]) )
tmp[ret-1] = '\0';
} else
{
if ( FS_isDelim(*srcdir) )
strcpy(tmp,srcdir);
else
sprintf(tmp,"%s%s",DirStart, srcdir);
}
FS_getFullPn(tmp2,tmp);
srcdir = tmp2;
att = _tarosc_fcopy_att;
ret = FCOPY_exec(att, srcdir, instfile, instdir);
syl_putf("EDIA CUSTOMIZE");
_edia_setup(instdir,item_setup);
if ( ret == (0) && item_setup != 0 )
{
syl_putf("EDIA ITEM SETUP");
if ( isalpha(_edia_swapDrv) )
sprintf(item_para,"-swapDrv %c", _edia_swapDrv);
drv = toupper(instdir[0]) - 'A';
strcpy(tmp,instdir);
add_path_fn(tmp,item_prog);
item_setApl( drv, 1024, item_ttl, tmp, item_para, item_att );
}
return (ret);
}
int _edia_setup(char *instdir,int item_setup)
{
return _hewin_edia_setup("edia.mac", instdir, item_setup);
}
int _hewin_edia_setup(char *fn_mac, char *instdir,int item_setup)
{
char *p, *s, *dir, *pathInst, fnMac[256], path[1024];
char *MACROKEY_EXPSEARCH_PATH;
char *amac;
pathInst = instdir;
MACROKEY_EXPSEARCH_PATH = "Exp_search_path";
strcpy(fnMac,pathInst);
add_path_fn(fnMac,fn_mac);
if ( (amac = AMAC_allocWork(0)) == (0) )
return ((-1));
AMAC_load( amac, fnMac );
if ( (p = AMAC_getName( amac, MACROKEY_EXPSEARCH_PATH)) == (0) || *p == '\0' )
{
path[0] = '\0';
p = path;
dir = _tarosc_instdir[(2)];
if ( *dir )
{
if ( p != path ) { *p = ';'; ++p; }
strcpy(p, dir);
p += strlen(dir);
}
dir = _tarosc_instdir[(3)];
if ( *dir )
{
if ( p != path ) { *p = ';'; ++p; }
strcpy(p, dir);
p += strlen(dir);
}
dir = _tarosc_instdir[(4)];
if ( *dir )
{
if ( p != path ) { *p = ';'; ++p; }
strcpy(p, dir);
p += strlen(dir);
}
dir = _tarosc_instdir[(6)];
if ( *dir )
{
if ( p != path ) { *p = ';'; ++p; }
strcpy(p, dir);
p += strlen(dir);
}
if ( p != path )
AMAC_setKey( amac, MACROKEY_EXPSEARCH_PATH, path );
} else
{
strcpy(path,p);
dir = _tarosc_instdir[(2)];
if ( _chk_pathlist(path,dir) == 0 )
{
strcat(path,";");
strcat(path,dir);
}
dir = _tarosc_instdir[(3)];
if ( _chk_pathlist(path,dir) == 0 )
{
strcat(path,";");
strcat(path,dir);
}
dir = _tarosc_instdir[(4)];
if ( _chk_pathlist(path,dir) == 0 )
{
strcat(path,";");
strcat(path,dir);
}
dir = _tarosc_instdir[(6)];
if ( _chk_pathlist(path,dir) == 0 )
{
strcat(path,";");
strcat(path,dir);
}
AMAC_setKey( amac, MACROKEY_EXPSEARCH_PATH, path );
}
AMAC_save( amac, fnMac, fn_mac);
AMAC_freeWork(amac);
return ((0));
}
int _chk_pathlist( char *pathlist, char *path )
{
char s1[1024], s2[256];
strcpy(s1,pathlist); FS_strupr(s1);
strcpy(s2,path); FS_strupr(s2);
if ( strstr(s1,s2) == (0) )
return (0);
else
return (1);
}
# 745 "insttaro.c"
int _gsplay_config(char *instdir, int item_setup)
{
int ret;
char *mnu_midi, *mnu_internal, *mnu_rsmidi, *mnu;
char tmp[128], *msg;
_gsplay_midi = 0;
_gsplay_rsmidi = -1;
_gsplay_internal = -1;
if ( item_setup )
{
mnu_midi = MNU_open();
mnu_rsmidi = MNU_open();
mnu_internal = MNU_open();
MNU_datAdd( mnu_midi , 0, 'A', Rom16x16, 0x01, "", (0), "port A (card-1)");
MNU_datAdd( mnu_midi , 0, 'B', Rom16x16, 0x02, "", (0), "port B (card-1)");
MNU_datAdd( mnu_midi , 0, 'C', Rom16x16, 0x03, "", (0), "port C (card-2)");
MNU_datAdd( mnu_midi , 0, 'D', Rom16x16, 0x04, "", (0), "port D (card-2)");
MNU_datAdd( mnu_midi , 0, 'E', Rom16x16, 0x05, "", (0), "port E (card-3)");
MNU_datAdd( mnu_midi , 0, 'F', Rom16x16, 0x06, "", (0), "port F (card-3)");
MNU_datAdd( mnu_midi , 0, 'G', Rom16x16, 0x07, "", (0), "port G (card-4)");
MNU_datAdd( mnu_midi , 0, 'H', Rom16x16, 0x08, "", (0), "port H (card-4)");
MNU_datAdd( mnu_midi , 0, 0 , (0) , 0, "", 0, (0) );
MNU_datAdd( mnu_midi , 0, 'O', Rom16x16, 0x00, "", (0), "MIDI device not use");
MNU_setPosition(mnu_midi,-1);
MNU_datAdd( mnu_rsmidi , 0, '1', Rom16x16, 0x21, "", (0), "ON 使う");
MNU_datAdd( mnu_rsmidi , 0, '0', Rom16x16, 0x20, "", (0), "OFF 使わない");
MNU_setPosition(mnu_rsmidi,-1);
MNU_datAdd( mnu_internal, 0, '1', Rom16x16, 0x31, "", (0), "ON 使う");
MNU_datAdd( mnu_internal, 0, '0', Rom16x16, 0x30, "", (0), "OFF 使わない");
MNU_setPosition(mnu_internal,-1);
do
{
if ( (mnu = MNU_open()) == (0) )
break;
MNU_setTitle( mnu, Fnt16x16, "GSPLAY 演奏データ出力デバイス" );
if ( _gsplay_midi < 0 )
{
msg = "not use";
} else
{
msg = tmp;
sprintf(msg,"port %c",_gsplay_midi + 'A' );
}
MNU_mnuAdd( mnu, 0, 'M', Fnt16x16, mnu_midi , "MIDI [%s]", msg);
msg = (_gsplay_rsmidi < 0) ? "not use" : "ON";
MNU_mnuAdd( mnu, 0, 'I', Fnt16x16, mnu_rsmidi , "RS-232C MIDI [%s]", msg);
msg = (_gsplay_internal < 0) ? "not use" : "ON";
MNU_mnuAdd( mnu, 0, 'I', Fnt16x16, mnu_internal, "内蔵音源 [%s]", msg);
MNU_datAdd( mnu, 0, 0 , (0) , 0, "", 0, (0) );
MNU_datAdd( mnu, 0, 'S', Rom16x16, 0xFF, "", 0, " <<< 設定終了 >>>");
MNU_setPosition(mnu,(1));
ret = MNU_start(mnu);
if ( ret >= 0x01 && ret <= 0x08 )
{
_gsplay_midi = ret - 0x01;
} else
{
switch ( ret )
{
case 0x00: _gsplay_midi = -1; break;
case 0x20: _gsplay_rsmidi = -1; break;
case 0x21: _gsplay_rsmidi = 0; break;
case 0x30: _gsplay_internal = -1; break;
case 0x31: _gsplay_internal = 0; break;
}
}
MNU_close(mnu);
MNU_datClear(mnu);
} while ( ret != 0xFF );
MNU_datClear(mnu_midi );
MNU_datClear(mnu_rsmidi );
MNU_datClear(mnu_internal);
}
return ((0));
}
int _gsplay_install(char *instdir,int item_setup)
{
int ret, att, len, drv;
char *srcdir, *instfile;
char *item_prog, *item_ttl, item_para[128];
int item_att;
char tmp[256], tmp2[256], ttl[80];
srcdir = "/TAROPYON/GSPLAY";
instfile = "*.exp *.dat *.gsd *.doc *.mex *.mid *.mtk *.kok *.tif";
item_prog = "GSPLAY.EXP";
item_ttl = "GSPLAY/pure";
item_para[0] = '\0';
item_att = 2;
syl_putf("GSPLAY INSTALL START");
FS_chdrv( toupper(DirStart[0]) - 'A' );
if ( *srcdir == '\0' || *srcdir == '.' )
{
strcpy(tmp,DirStart);
ret = strlen(tmp);
if ( ret > 3 && FS_isDelim(tmp[ret-1]) )
tmp[ret-1] = '\0';
} else
{
if ( FS_isDelim(*srcdir) )
strcpy(tmp,srcdir);
else
sprintf(tmp,"%s%s",DirStart, srcdir);
}
FS_getFullPn(tmp2,tmp);
srcdir = tmp2;
att = _tarosc_fcopy_att;
ret = FCOPY_exec(att, srcdir, instfile, instdir);
syl_putf("GSPLAY CUSTOMIZE");
_gsplay_setup(instdir,item_setup);
if ( ret == (0) && item_setup != 0 )
{
syl_putf("GSPLAY ITEM SETUP");
strcpy(tmp,instdir);
add_path_fn(tmp,item_prog);
if ( _gsplay_midi >= 0 )
{
item_ttl = "GSPLAY/pure (MIDI)";
sprintf(item_para,"-gsPort %c", _gsplay_midi + 'A');
item_setApl( drv, 1024, item_ttl, tmp, item_para, item_att );
}
if ( _gsplay_internal >= 0 )
{
item_ttl = "GSPLAY/pure (内蔵)";
strcpy(item_para,"-gsPort A -intPort A");
item_setApl( drv, 1024, item_ttl, tmp, item_para, item_att );
}
if ( _gsplay_rsmidi >= 0 )
{
item_ttl = "GSPLAY/pure (RS)";
strcpy(item_para,"-rsmidi -gsPort R");
item_setApl( drv, 1024, item_ttl, tmp, item_para, item_att );
}
}
return (ret);
}
int _gsplay_setup(char *instdir,int item_setup)
{
return ((0));
}
# 909 "insttaro.c"
int _he386_install(char *instdir,int item_setup)
{
int ret, att, len, drv;
char *srcdir, *instfile;
char tmp[256], tmp2[256];
srcdir = "/TAROPYON/HE386";
instfile = "*.exp *.dll *.cci *.c *.h *.doc *.mml *.def";
syl_putf("HE386 INSTALL START");
FS_chdrv( toupper(DirStart[0]) - 'A' );
if ( *srcdir == '\0' || *srcdir == '.' )
{
strcpy(tmp,DirStart);
ret = strlen(tmp);
if ( ret > 3 && FS_isDelim(tmp[ret-1]) )
tmp[ret-1] = '\0';
} else
{
if ( FS_isDelim(*srcdir) )
strcpy(tmp,srcdir);
else
sprintf(tmp,"%s%s",DirStart, srcdir);
}
FS_getFullPn(tmp2,tmp);
srcdir = tmp2;
att = _tarosc_fcopy_att;
ret = FCOPY_exec(att, srcdir, instfile, instdir);
return (ret);
}
# 946 "insttaro.c"
int _cci_install(char *instdir,int item_setup)
{
int ret, att, len, drv;
char *srcdir, *instfile;
char tmp[256], tmp2[256];
srcdir = "/TAROPYON/CCI";
instfile = "*.exp *.dll *.doc *.lst *.h *.c *.bat *.exe";
syl_putf("CCI INSTALL START");
FS_chdrv( toupper(DirStart[0]) - 'A' );
if ( *srcdir == '\0' || *srcdir == '.' )
{
strcpy(tmp,DirStart);
ret = strlen(tmp);
if ( ret > 3 && FS_isDelim(tmp[ret-1]) )
tmp[ret-1] = '\0';
} else
{
if ( FS_isDelim(*srcdir) )
strcpy(tmp,srcdir);
else
sprintf(tmp,"%s%s",DirStart, srcdir);
}
FS_getFullPn(tmp2,tmp);
srcdir = tmp2;
att = _tarosc_fcopy_att;
ret = FCOPY_exec(att, srcdir, instfile, instdir);
return (ret);
}
# 982 "insttaro.c"
int _dostool_install(char *instdir,int item_setup)
{
int ret, att, len, drv;
char *srcdir, *instfile;
char tmp[256], tmp2[256];
srcdir = "/TAROPYON/DOSTOOL";
instfile = "*.exe *.doc";
syl_putf("DOS TOOL INSTALL START");
FS_chdrv( toupper(DirStart[0]) - 'A' );
if ( *srcdir == '\0' || *srcdir == '.' )
{
strcpy(tmp,DirStart);
ret = strlen(tmp);
if ( ret > 3 && FS_isDelim(tmp[ret-1]) )
tmp[ret-1] = '\0';
} else
{
if ( FS_isDelim(*srcdir) )
strcpy(tmp,srcdir);
else
sprintf(tmp,"%s%s",DirStart, srcdir);
}
FS_getFullPn(tmp2,tmp);
srcdir = tmp2;
att = _tarosc_fcopy_att;
ret = FCOPY_exec(att, srcdir, instfile, instdir);
return (ret);
}
# 1018 "insttaro.c"
int _tostool_install(char *instdir,int item_setup)
{
int ret, att, len, drv;
char *srcdir, *instfile;
char tmp[256], tmp2[256];
srcdir = "/TAROPYON/TOSTOOL";
instfile = "*.exp *.dll *.doc";
syl_putf("TOS TOOL INSTALL START");
FS_chdrv( toupper(DirStart[0]) - 'A' );
if ( *srcdir == '\0' || *srcdir == '.' )
{
strcpy(tmp,DirStart);
ret = strlen(tmp);
if ( ret > 3 && FS_isDelim(tmp[ret-1]) )
tmp[ret-1] = '\0';
} else
{
if ( FS_isDelim(*srcdir) )
strcpy(tmp,srcdir);
else
sprintf(tmp,"%s%s",DirStart, srcdir);
}
FS_getFullPn(tmp2,tmp);
srcdir = tmp2;
att = _tarosc_fcopy_att;
ret = FCOPY_exec(att, srcdir, instfile, instdir);
return (ret);
}
# 1054 "insttaro.c"
int tarosdk_install()
{
static char *buf[4] =
{
"softname \"サイドワークプログラム集\"",
"instfile /TAROPYON/SDKTOOL \"*.exp *.doc\"",
"help SDKTOOL.GGG",
(0)
};
install_exec(buf);
return (0);
}
int splib_install()
{
static char *buf[4] =
{
"softname \"High C用ライブラリ (splib)\"",
"instfile /TAROPYON/SPLIB \"*.*\"",
"help splib.ggg",
(0)
};
install_exec(buf);
return (0);
}
int silib_install()
{
static char *buf[4] =
{
"softname \"High C用ライブラリ (silib)\"",
"instfile /TAROPYON/SILIB \"*.*\"",
"help silib.ggg",
(0)
};
install_exec(buf);
return (0);
}
int dtalib_install()
{
static char *buf[4] =
{
"softname \"DTA ライブラリ\"",
"instfile /TAROPYON/DTALIB \"*.*\"",
"help dtalib.ggg",
(0)
};
install_exec(buf);
return (0);
}
# 2 "instkok2.c"
int _call_gsplay( char *para);
char *get_inst_gsplaydata_mnu()
{
char *mnu;
if ( (mnu = MNU_open()) == (0) )
return ((0));
MNU_datAdd( mnu, 0, 'D', Rom16x16, 0, "install_demodemo", 0, "DEMODEMO");
MNU_datAdd( mnu, 0, 'F', Rom16x16, 0, "install_fdoal" , 0, "フランス人形とプードル");
MNU_datAdd( mnu, 0, 'T', Rom16x16, 0, "install_trainm" , 0, "走れ汽車ぽっぽ");
return (mnu);
}
int install_demodemo()
{
static char *buf[5] =
{
"softname \"DEMODEMO\"",
"instfile /TAROPYON/HORIKEN/DEMODEMO \"*.*\"",
"help demodemo.ggg",
"demo \"再生\" _gsplay_demodemo",
(0)
};
return install_exec(buf);
}
int _gsplay_demodemo()
{
return _call_gsplay( "../HORIKEN/DEMODEMO/demodemo.mid" );
}
int install_fdoal()
{
static char *buf[5] =
{
"softname \"フランス人形とプードル\"",
"instfile /TAROPYON/HORIKEN/FDOAL \"*.*\"",
"help fdoal.ggg",
"demo \"再生\" _gsplay_fdoal",
(0)
};
return install_exec(buf);
}
int _gsplay_fdoal()
{
return _call_gsplay( "../HORIKEN/FDOAL/fdoal.mid" );
}
int install_trainm()
{
static char *buf[5] =
{
"softname \"走れ汽車ぽっぽ\"",
"instfile /TAROPYON/HORIKEN/TRAINM \"*.*\"",
"help trainm.ggg",
"demo \"再生\" _gsplay_trainm",
(0)
};
return install_exec(buf);
}
int _gsplay_trainm()
{
return _call_gsplay( "../HORIKEN/TRAINM/trainm.mid" );
}
int _call_gsplay( char *para)
{
char tmp[256], fn_gsplay[256], fn_mid[256], para_gsplay[256];
FS_chdrv(toupper(DirStart[0]) - 'A');
sprintf(tmp, "%s../%s", DirStart, "GSPLAY/gsplay.exp");
FS_getFullPn(fn_gsplay,tmp);
sprintf(tmp, "%s../HORIKEN/%s", DirStart, para);
FS_getFullPn(fn_mid ,tmp);
sprintf(para_gsplay,"-quick %s",fn_mid);
exprun(fn_gsplay, para_gsplay);
return (0);
}
# 5 "instexec.c"
int install_exec( char **probuf )
{
int ret, i, fcopy_att, drv, argc, srcdrv;
char **argv, *p, *typename;
char instdir[256];
char softname[80];
char srcdir[128], instfile[128];
char helpfn[128];
char item_ttl[80],item_prog[32], item_para[128];
int item_setup, item_num, item_att;
char arcfn[128], arcdir[128], arcflag;
char runfn[128], runpara[128];
char demo_msg[80], demo_func[80];
char *lhalib;
char *dlgTxm;
char tmp[256], tmp2[256];
fcopy_att = (0x00000001) | (0x00000010) | (0x00000100);
instdir[0] = '\0';
srcdir[0] = '\0';
instfile[0] = '\0';
helpfn[0] = '\0';
item_num = 0;
item_ttl[0] = '\0';
arcfn[0] = '\0';
arcdir[0] = '\0';
arcflag = 0;
runpara[0] = '\0';
runfn[0] = '\0';
demo_msg[0] = '\0';
demo_func[0] = '\0';
srcdrv = toupper(DirStart[0]) - 'A';
for ( i = 0; probuf[i] != (0); ++i )
{
if ( (argc = DTA_makeArg(probuf[i],&argv)) > 0 )
{
typename = argv[0];
if ( strcmpi(typename,"softname") == 0 )
{
if ( argc >= 2 )
strcpy( softname, argv[1]);
} else if ( strcmpi(typename,"instfile") == 0 )
{
if ( argc >= 2 )
strcpy(srcdir , argv[1]);
if ( argc >= 3 )
strcpy(instfile, argv[2]);
if ( argc >= 4 )
{
if ( strcmpi(argv[3],"-nocopydir") == 0 )
fcopy_att &= (~(0x00000001));
}
} else if ( strcmpi(typename,"help") == 0 )
{
if ( argc >= 2 )
{
if ( FS_isDelim(argv[1][0]) )
strcpy(helpfn, argv[1]);
else if ( srcdir[0] != '\0' )
sprintf(helpfn,"%s/%s",srcdir,argv[1]);
}
} else if ( strcmpi(typename,"item") == 0 )
{
++item_num;
if ( argc >= 5 )
{
strcpy(item_ttl , argv[1]);
strcpy(item_prog, argv[2]);
strcpy(item_para, argv[3]);
item_att = atoi(argv[4]);
}
} else if ( strcmpi(typename,"arcfile") == 0 )
{
if ( argc >= 2 )
{
strcpy( arcfn , argv[1]);
arcflag = 1;
}
if ( argc >= 3 )
strcpy( arcdir, argv[2]);
} else if ( strcmpi(typename,"runexp") == 0 )
{
if ( argc >= 2 && srcdir[0] )
{
strcpy(runfn,srcdir);
add_path_fn(runfn,argv[1]);
}
if ( argc >= 3 )
strcpy(runpara,argv[2]);
} else if ( strcmpi(typename,"demo") == 0 )
{
if ( argc >= 3 )
{
strcpy(demo_msg ,argv[1]);
strcpy(demo_func,argv[2]);
}
}
DTA_clearArg(argc,argv);
}
}
_TOP:
syl_putf("%s",softname);
dlgTxm = DlgTxm_open(ColBoxNormal);
DlgTxm_setTitle(dlgTxm,Fnt16x16,softname);
DlgTxm_putf( dlgTxm, Fnt16x16, (1),
"%s をインストールします。", softname );
DlgTxm_setBtn( dlgTxm, Fnt16x16, 128, 20, (_ScnCol_black), (_ScnColTbl[ 7]), (_ScnCol_hilight), (_ScnCol_dark), '\r' , 0x7300 ,
1, "", (0), "インストール : [実行]");
DlgTxm_setBtn( dlgTxm, Fnt16x16, 128, 20, (_ScnCol_black), (_ScnColTbl[ 7]), (_ScnCol_hilight), (_ScnCol_dark), 'H' , 0x2300 ,
2, "inst_help", helpfn, "説明 : [H]");
if ( runfn[0] )
{
DlgTxm_setBtn( dlgTxm, Fnt16x16, 128, 20, (_ScnCol_black), (_ScnColTbl[ 7]), (_ScnCol_hilight), (_ScnCol_dark), 'R' , 0x1400 ,
3, "", (0), "実行 : [R]");
} else if ( demo_msg[0] )
{
DlgTxm_setBtn( dlgTxm, Fnt16x16, 128, 20, (_ScnCol_black), (_ScnColTbl[ 7]), (_ScnCol_hilight), (_ScnCol_dark), 'D' , 0x2000 ,
3, "", (0), "%s : [D]", demo_msg);
}
DlgTxm_setBtn( dlgTxm, Fnt16x16, 128, 20, (_ScnCol_black), (_ScnColTbl[ 7]), (_ScnCol_hilight), (_ScnCol_dark), '\x1B', 0x7200,
4, "", (0), "取消 : [取消]");
DlgTxm_setSize(dlgTxm,320,40);
DlgTxm_setPosition(dlgTxm,(1));
do
{
ret = DlgTxm_start(dlgTxm);
} while ( ret == 2 );
DlgTxm_close(dlgTxm);
if ( ret == 3 )
{
if ( runfn[0] )
{
dlgTxm = DlgTxm_open(ColBoxCaution);
DlgTxm_setTitle(dlgTxm,Fnt16x16,softname);
DlgTxm_putf( dlgTxm, Fnt16x16, (1),
"%s を実行します。", softname );
DlgTxm_putf( dlgTxm, Fnt16x12, (1),"");
DlgTxm_putf( dlgTxm, Fnt16x16, (1),
"※ メモリが不足している場合は実行できません。" );
DlgTxm_setBtn( dlgTxm, Fnt16x16, 128, 20, (_ScnCol_black), (_ScnColTbl[ 7]), (_ScnCol_hilight), (_ScnCol_dark), '\r' , 0x7300 ,
1, "", (0), "実行 : [実行]");
DlgTxm_setBtn( dlgTxm, Fnt16x16, 128, 20, (_ScnCol_black), (_ScnColTbl[ 7]), (_ScnCol_hilight), (_ScnCol_dark), '\x1B', 0x7200,
0, "", (0), "取消 : [取消]");
DlgTxm_setSize(dlgTxm,400,40);
DlgTxm_setPosition(dlgTxm,(1));
ret = DlgTxm_start(dlgTxm);
DlgTxm_close(dlgTxm);
if ( ret == 1 )
exprun(runfn,runpara);
} else if ( demo_msg )
{
_funcCall(demo_func, 0);
}
goto _TOP;
} else if ( ret != 1 )
goto _RET;
if ( arcfn[0] && arcdir[0] )
{
dlgTxm = DlgTxm_open(ColBoxNormal);
DlgTxm_setTitle(dlgTxm,Fnt16x16,softname);
DlgTxm_putf( dlgTxm, Fnt16x16, (1),
"ソ\ースプログラムもインストールしますか?" );
DlgTxm_setBtn( dlgTxm, Fnt16x16, 160, 20, (_ScnCol_black), (_ScnColTbl[ 7]), (_ScnCol_hilight), (_ScnCol_dark), 'S' , 0x1F00 ,
1, "", 0, "ソースをインストールする : [S]");
DlgTxm_setBtn( dlgTxm, Fnt16x16, 160, 20, (_ScnCol_black), (_ScnColTbl[ 7]), (_ScnCol_hilight), (_ScnCol_dark), '\x1B', 0x7200,
0, "", 0, "インストールしない : [取消]");
DlgTxm_setSize(dlgTxm,480,40);
DlgTxm_setPosition(dlgTxm,(1));
ret = DlgTxm_start(dlgTxm);
DlgTxm_close(dlgTxm);
arcflag = (ret == 1) ? 1 : 0;
}
ret = APL_setInstallDir(instdir,"%s : インストール先指定", softname);
if ( ret )
goto _TOP;
dlgTxm = DlgTxm_open(ColBoxNormal);
DlgTxm_setTitle(dlgTxm,Fnt16x16,softname);
DlgTxm_putf( dlgTxm, Fnt16x16, (1),
"%s", instdir );
DlgTxm_putf( dlgTxm, Fnt16x16, (1),
"このディレクトリにインストールしてもいいですか?" );
DlgTxm_putf( dlgTxm, Fnt16x12, (1),"");
if ( item_ttl[0] )
{
DlgTxm_putf( dlgTxm, Fnt16x16, (1),
"インストール1 … ファイルを複写してTownsMENU にアイテム登録");
DlgTxm_putf( dlgTxm, Fnt16x16, (1),
"インストール2 … ファイルを複写(アイテム登録はしない) ");
DlgTxm_setBtn( dlgTxm, Fnt16x16, 144, 20, (_ScnCol_black), (_ScnColTbl[ 7]), (_ScnCol_hilight), (_ScnCol_dark), '\r' , 0x7300 , 1, "", 0, "インストール1 : [実行]");
DlgTxm_setBtn( dlgTxm, Fnt16x16, 144, 20, (_ScnCol_black), (_ScnColTbl[ 7]), (_ScnCol_hilight), (_ScnCol_dark), 'C' , 0x2C00 , 2, "", 0, "インストール2 : [C]");
} else
{
DlgTxm_setBtn( dlgTxm, Fnt16x16, 144, 20, (_ScnCol_black), (_ScnColTbl[ 7]), (_ScnCol_hilight), (_ScnCol_dark), '\r' , 0x7300 , 2, "", 0, "インストール : [実行]");
}
DlgTxm_setBtn( dlgTxm, Fnt16x16, 144, 20, (_ScnCol_black), (_ScnColTbl[ 7]), (_ScnCol_hilight), (_ScnCol_dark), '\x1B', 0x7200, 3, "", 0, "取消 : [取消]");
DlgTxm_setSize(dlgTxm,320,40);
DlgTxm_setPosition(dlgTxm,(1));
ret = DlgTxm_start(dlgTxm);
DlgTxm_close(dlgTxm);
if ( ret != 1 && ret != 2 )
goto _TOP;
item_setup = (ret == 1 ? 1 : 0);
syl_putf("INSTALL START");
FS_chdrv(srcdrv);
if ( *srcdir == '\0' || *srcdir == '.' )
{
strcpy(tmp,DirStart);
ret = strlen(tmp);
if ( ret > 3 && FS_isDelim(tmp[ret-1]) )
tmp[ret-1] = '\0';
} else
{
if ( FS_isDelim(*srcdir) )
strcpy(tmp,srcdir);
else
sprintf(tmp,"%s%s",DirStart, srcdir);
}
if ( instfile[0] )
{
FS_getFullPn(tmp2,tmp);
srcdir = tmp2;
ret = FCOPY_exec(fcopy_att, srcdir, instfile, instdir);
}
if ( arcfn[0] && arcflag )
{
syl_putf("ARC(.LZH) FILE EXTRACT");
FS_chdrv(srcdrv);
strcpy(tmp,srcdir);
add_path_fn(tmp,arcfn);
strcpy(tmp2,instdir);
if ( arcdir[0] )
add_path_fn(tmp2,arcdir);
if ( (lhalib = LHA_openArc(tmp)) != (0) )
{
ret = LHA_extractAll(lhalib,tmp2);
LHA_closeArc(lhalib);
} else
{
syl_putf("ARC OPEN ERROR");
ret = (-1);
}
}
if ( ret == (0) && item_setup != 0 )
{
syl_putf("ITEM SETUP");
drv = toupper(instdir[0]) - 'A';
if ( item_num == 1 )
{
strcpy(tmp,instdir);
add_path_fn(tmp,item_prog);
item_setApl( drv, 1024, item_ttl, tmp, item_para, item_att );
} else
{
for ( i = 0; probuf[i] != (0); ++i )
{
if ( (argc = DTA_makeArg(probuf[i],&argv)) > 0 )
{
typename = argv[0];
if ( strcmpi(typename,"item") == 0 )
{
if ( argc >= 5 )
{
strcpy(item_ttl , argv[1]);
strcpy(item_prog, argv[2]);
strcpy(item_para, argv[3]);
item_att = atoi(argv[4]);
strcpy(tmp,instdir);
add_path_fn(tmp,item_prog);
item_setApl( drv, 1024, item_ttl, tmp, item_para, item_att );
}
}
DTA_clearArg(argc,argv);
}
}
}
}
install_end( softname, ret );
_RET:
syl_clear();
return (0);
}
# 5 "instlib.c"
int _puts_bold(int x, int y, int col, char *s);
# 11 "instlib.c"
int syl_clear()
{
char *msg, tmp[80];
SCN_wrtPage(1);
PD_curDec();
msg = "TaroPYON SoftWare collection installer";
SCN_boxf(0,464,639,479,0,ColMesh);
SCN_puts(Fnt16x16,msg,272+1,464+1,0,(_ScnCol_black) ,0);
SCN_puts(Fnt16x16,msg,272 ,464 ,0,PltNoWhite,0);
PD_curInc();
}
# 32 "instlib.c"
int syl_putf(char *form)
{
char tmp[256];
char *ap;
int n, x;
(ap = (char *)(&form) + sizeof(int));
vsprintf(tmp+6,form,ap);
;
SCN_wrtPage(1);
PD_curDec();
SCN_boxf(0,464,639,479,0,ColMesh);
EGB_textDirection(EgbPtr,0);
EGB_textDisplayDirection(EgbPtr,0);
EGB_textSpace(EgbPtr,0);
EGB_textZoom(EgbPtr,0, 8, 16 );
EGB_textZoom(EgbPtr,1, 16, 16 );
EGB_fontStyle(EgbPtr,1+4);
EGB_color(EgbPtr,0,(_ScnColTbl[12]));
EGB_color(EgbPtr,1,(_ScnCol_black));
EGB_paintMode(EgbPtr,0x022);
EGB_writeMode(EgbPtr,0);
n = strlen(tmp+6);
x = (640 - n * 8) / 2;
_setWord(tmp+0, x );
_setWord(tmp+2, 464+15);
_setWord(tmp+4, n );
EGB_sjisString( EgbPtr, tmp);
PD_curInc();
}
int _puts_bold(int x, int y, int col, char *s)
{
char para[256];
EGB_textDirection(EgbPtr,0);
EGB_textDisplayDirection(EgbPtr,0);
EGB_textSpace(EgbPtr,0);
EGB_textZoom(EgbPtr,0, 8, 16 );
EGB_textZoom(EgbPtr,1, 16, 16 );
EGB_fontStyle(EgbPtr,1+4);
EGB_color(EgbPtr,0,col );
EGB_color(EgbPtr,1,(_ScnCol_black));
EGB_paintMode(EgbPtr,0x022);
EGB_writeMode(EgbPtr,0);
_setWord(para+0, x );
_setWord(para+2, y+15 );
_setWord(para+4, strlen(s));
strcpy(para+6,s);
EGB_sjisString( EgbPtr, para);
}
char *add_path_fn(char *path, char *fn)
{
int len;
len = strlen(path);
if ( len == 0 || !(path[len-1] == '\\' || path[len-1] == '/') )
path[len++] = FsPathDelim;
strcpy( path + len, fn );
return (path);
}
# 106 "instlib.c"
int tif_load(char *fn)
{
char *img;
SCN_wrtPage(0);
if ( (img = IMG_open()) != (0) )
{
IMG_setPage(img,0);
IMG_setAtt(img,(0x00010000));
IMG_setColor( img, (_ScnCol_black), (_ScnCol_white));
if ( IMG_load(img,fn) == (0) )
{
IMG_setPos(img,0,24);
EGB_color(EgbPtr,1,(_ScnColTbl[15]));
# 125 "instlib.c"
EGB_clearScreen(EgbPtr);
EGB_paintMode(EgbPtr,0x22);
IMG_dsp(img);
}
IMG_close(img);
}
SCN_wrtPage(1);
return ((0));
}
# 139 "instlib.c"
int tiflist_disp( char **list )
{
int i, x, y, ret, pixel, md, x0, y0;
char *img;
short fr[4];
char *fn;
SCN_wrtPage(1);
APL_save_desktop();
SCN_boxf(0,0,639,479,0,0);
SCN_wrtPage(0);
for ( i = 0; list[i] != (0); ++i )
{
fn = list[i];
if ( (img = IMG_open()) != (0) )
{
IMG_setAtt(img,(0x00010000));
if ( IMG_load(img,fn) == (0) )
{
IMG_getFr(img,fr);
pixel = IMG_getPixel(img);
switch ( pixel )
{
case 1:
case 4:
x0 = (640 - (fr[2] - fr[0] + 1)) / 2;
y0 = (480 - (fr[3] - fr[1] + 1)) / 2;
md = 3;
break;
case 8:
x0 = (640 - (fr[2] - fr[0] + 1)) / 2;
y0 = (480 - (fr[3] - fr[1] + 1)) / 2;
md = 12;
break;
case 16:
if ( fr[2] - fr[0] + 1 <= 320 )
{
x0 = (320 - (fr[2] - fr[0] + 1)) / 2;
y0 = (240 - (fr[3] - fr[1] + 1)) / 2;
md = 10;
} else
{
x0 = (512 - (fr[2] - fr[0] + 1)) / 2;
y0 = (480 - (fr[3] - fr[1] + 1)) / 2;
md = 17;
}
break;
default:
goto _TIF_ERR;
}
IMG_setPos(img,x0,y0);
PD_curOff();
EGB_displayPage(EgbPtr,0,0);
EGB_writePage(EgbPtr,0);
EGB_clearScreen(EgbPtr);
EGB_resolution(EgbPtr,0,md);
if ( md == 3 || md == 10 )
{
EGB_resolution(EgbPtr,1,3);
EGB_writePage(EgbPtr,1);
EGB_clearScreen(EgbPtr);
}
EGB_writePage(EgbPtr,0);
if ( md == 10 )
{
EGB_displayStart(EgbPtr,2,2,2);
EGB_displayStart(EgbPtr,3,320,240);
}
EGB_color(EgbPtr,1,0);
EGB_clearScreen(EgbPtr);
IMG_dsp(img);
if ( md == 3 || md == 10 )
EGB_displayPage(EgbPtr,1,3);
else
EGB_displayPage(EgbPtr,0,1);
_apl_wait(100 * 8);
while ( PD_getp(&x,&y) )
;
}
IMG_close(img);
}
}
EGB_writePage(EgbPtr,0);
EGB_clearScreen(EgbPtr);
SCN_sysReinit();
disp_desktop();
SCN_wrtPage(1);
APL_load_desktop();
syl_clear();
return ((0));
}
int mveplay(char *fnmve, int loop)
{
char para[256];
sprintf(para,"-loop %d %s", loop, fnmve );
exprun("/OH_TOWNS/DEMOTOOL/mveplay.exp", para );
return (0);
}
int exprun(char *fn, char *para)
{
unsigned int siz;
int md;
char tmp[256];
char *dlgTxm;
siz = APL_getFreeMem();
if ( siz < 2 * 1024 * 1024 )
{
dlgTxm = DlgTxm_open(ColBoxError);
DlgTxm_setTitle(dlgTxm,Fnt16x16, "OUT OF MEMORY");
DlgTxm_putf( dlgTxm, Rom16x16, (1),"");
DlgTxm_putf( dlgTxm, Rom16x16, (1),
"メモリ不足のため実行できません。" );
DlgTxm_putf( dlgTxm, Rom16x16, (1),"");
DlgTxm_setBtn( dlgTxm, Fnt16x16, 128, 20, (_ScnCol_black),
(_ScnColTbl[ 7]), (_ScnCol_hilight), (_ScnCol_dark), '\r', 0x7300, 0, "", 0, "OK : [実行]");
DlgTxm_setSize(dlgTxm,480,48);
DlgTxm_setPosition(dlgTxm,(1));
DlgTxm_start(dlgTxm);
DlgTxm_close(dlgTxm);
return (-1);
}
FS_chdrv( toupper(DirStart[0]) - 'A' );
FS_getDnam(tmp,fn);
add_path_fn(tmp,".");
FS_chdir(tmp);
SCN_wrtPage(1);
APL_save_desktop();
md = (4) | (8);
AplDtaInit();
if ( para != (0) && *para != '\0' )
{
AplDtaSetStr("$MainArg","%s %s", fn, para);
if ( strlen(fn) + strlen(para) + 1 >= 128 )
md &= (~(8));
}
PCL_exec(fn,md);
SCN_sysReinit();
disp_desktop();
SCN_wrtPage(1);
APL_load_desktop();
syl_clear();
return ((0));
}
# 310 "instlib.c"
int inst_help( int evNo, char *evDat, char *fn)
{
char tmp[256];
FS_chdrv(toupper(DirStart[0]) - 'A');
sprintf(tmp,"%s.",DirStart);
FS_chdir(tmp);
APL_textView(Rom16x16,608,391,17,fn,"HELP FILE : %s", fn);
return (evNo);
}
# 327 "instlib.c"
int install_end( char *soft_name, int err )
{
char *dlgTxm;
int colbox;
char *msg;
msg = err == 0 ? "インストールが終わりました。"
: "インストールに失敗しました。";
colbox = 0;
colbox = SCN_tile_newMixCol(colbox,0x00,(_ScnColTbl[12]),(_ScnColTbl[ 7]));
if ( (dlgTxm = DlgTxm_open(colbox)) != (0) )
{
DlgTxm_setTitle(dlgTxm,Fnt16x16,soft_name);
DlgTxm_putf( dlgTxm, Fnt16x16, (1), "");
DlgTxm_putf( dlgTxm, Fnt16x16, (1), msg );
DlgTxm_putf( dlgTxm, Fnt16x16, (1), "");
DlgTxm_setBtn( dlgTxm, Fnt16x16, 64, 20, (_ScnCol_black), (_ScnColTbl[ 7]), (_ScnCol_hilight), (_ScnCol_dark), '\r' , 0x7300 , 1, "", 0, "OK : [実行]");
DlgTxm_setSize(dlgTxm,480,64);
DlgTxm_setPosition(dlgTxm,(1));
DlgTxm_start(dlgTxm);
DlgTxm_close(dlgTxm);
}
SCN_tile_free(colbox);
}
# 10 "item.c"
int item_get_newpos( char *pathItem, int fposBase, short *newfrm );
int item_chkpos( char *pathItem, int fposStart, short *frmchk );
int item_get_fr( char *pathItem, int fpos, short *fr );
int item_adjust_pos( short *newfrm );
int item_setApl( int drv, int icon, char *ttl, char *path, char *para, int att )
{
char pathItem[64], prog[128];
short fr[4];
int iconGrp;
int fpos;
char *ttlGrp;
ttlGrp = "NEW ITEM";
iconGrp = 1059;
sprintf( pathItem, "%c:\\tmenu.itm", drv + 'A');
if ( FS_isFile(pathItem) != (1) )
{
ITM_CreateItemFile(pathItem);
}
fr[0] = fr[1] = fr[2] = fr[3] = -1;
fpos = ITM_GetGrpFPos(pathItem,0,-1,-1,ttlGrp,-1,fr);
if ( fpos < 0 )
{
item_get_newpos( pathItem, 0, fr);
if ( (fpos = ITM_AddGrpItem(pathItem,0,iconGrp,ttlGrp,fr)) < 0 )
return ((-1));
}
if ( item_get_newpos( pathItem, fpos, fr) < 0 )
return ((-1));
FS_dosFn(prog,path);
FS_strupr(prog);
if ( ITM_AddAplItem( pathItem, fpos, icon, ttl, prog, para, att, fr) < 0 )
return ((-1));
return ((0));
}
int item_get_newpos( char *pathItem, int fposBase, short *newfrm )
{
int area, x, y, x0, y0;
for ( area = 0; area < 9; ++area )
{
x = area;
for ( y = 0; y < area; ++y )
{
x0 = x * 64; newfrm[0] = x0+8; newfrm[2] = x0 + 63-8;
y0 = y * 48; newfrm[1] = y0+4; newfrm[3] = y0 + 47-4;
if ( item_chkpos( pathItem, fposBase, newfrm ) )
goto _OK;
}
y = area;
for ( x = 0; x <= area; ++x )
{
x0 = x * 64; newfrm[0] = x0+8; newfrm[2] = x0 + 63-8;
y0 = y * 48; newfrm[1] = y0+4; newfrm[3] = y0 + 47-4;
if ( item_chkpos( pathItem, fposBase, newfrm ) )
goto _OK;
}
}
_OK:
x0 = (newfrm[0] + newfrm[2] + 1) / 2 - 12;
newfrm[0] = (x0+7) & (~7);
newfrm[1] = newfrm[1] + 4;
newfrm[2] = newfrm[0] + 24;
newfrm[3] = newfrm[1] + 24;
# 86 "item.c"
return (item_adjust_pos( newfrm ));
}
int item_chkpos( char *pathItem, int fposStart, short *frmchk )
{
int ret;
int fpos, nextFPos;
int etyNum;
short icnNum;
char ttlStr[128];
int atrInf;
short frm[4];
int numItem;
# 105 "item.c"
if ( (fpos = fposStart) > 0 )
{
ret = ITM_GetItmType(pathItem,fpos);
if ( ret != 1 )
return (-1);
ITM_GetGrpData(pathItem,fpos,&etyNum,&icnNum,ttlStr,&nextFPos,frm);
# 115 "item.c"
while ( etyNum-- > 0 )
{
if ( (fpos = ITM_GetPhysclNextFPos( pathItem, fpos )) < 0 )
break;
if ( (ret = item_get_fr( pathItem, fpos, frm )) == 0 )
{
if ( frm[0] <= frmchk[2] && frm[2] >= frmchk[0]
&& frm[1] <= frmchk[3] && frm[3] >= frmchk[1] )
return (0);
}
}
} else
{
while ( (fpos = ITM_GetPhysclNextFPos( pathItem, fpos )) > 0 )
{
if ( ITM_GetStair( pathItem, fpos ) == 0 )
{
if ( (ret = item_get_fr( pathItem, fpos, frm )) == 0 )
{
if ( frm[0] <= frmchk[2] && frm[2] >= frmchk[0]
&& frm[1] <= frmchk[3] && frm[3] >= frmchk[1] )
return (0);
}
}
}
}
return (1);
}
int item_get_fr( char *pathItem, int fpos, short *fr )
{
int ret;
int nextFPos;
int etyNum;
short icnNum;
char ttlStr[128], pathStr[128], paraStr[128];
int atrInf;
# 156 "item.c"
ret = ITM_GetItmType(pathItem,fpos);
# 160 "item.c"
switch ( ret )
{
case 1:
ITM_GetGrpData(pathItem,fpos,&etyNum,&icnNum,ttlStr,&nextFPos,fr);
# 167 "item.c"
break;
case 2:
ITM_GetAplData(pathItem,fpos,&icnNum,ttlStr,pathStr,paraStr,atrInf,fr);
# 173 "item.c"
break;
case 3:
return (-1);
default:
return (-1);
}
return (0);
}
int item_adjust_pos( short *newfrm )
{
if ( newfrm[2] > 621 )
{
newfrm[2] = 621;
newfrm[0] = newfrm[2] - 24;
}
if ( newfrm[3] > 410 )
{
newfrm[3] = 410;
newfrm[1] = newfrm[3] - 24;
}
return ((0));
}